﻿<div class="tabbable">
    <ul class="nav nav-tabs">
        <li class="active">
            <a data-toggle="tab" href="#" data-bind="click: showAll">全部</a>
        </li>
        <li>
            <a data-toggle="tab" href="#" data-bind="click: showNotUsed">可使用</a>
        </li>
        <li>
            <a data-toggle="tab" href="#" data-bind="click: showUsed">已使用</a>
        </li>
        <li>
            <a data-toggle="tab" href="#" data-bind="click: showExpired">已过期</a>
        </li>
        <li class="pull-right">
            <a href="/ExportExcel.aspx?type=couponCodes" class="btn btn-sm btn-primary">导出</a>
        </li>
        <li class="pull-right">
            <a data-bind='click:generateCouponCode' id="generateCouponCode" href="javascript:" class="btn btn-sm btn-primary">生成优惠码</a>
        </li>
        <!--<li class="pull-right">
            <a id="useCouponCode" href="javascript:" class="btn btn-sm btn-primary">使用优惠码</a>
        </li>-->
        <li class="pull-right">
            <a id="btnSearch" data-bind="click: search" class="btn btn-sm btn-primary">查找</a>
        </li>
        <li class="pull-right">
            <input data-bind="value: filter.searchText" id="txtSearch" class="nav-search-input" type="text" placeholder="输入要查找的优惠码或优惠券编号" style="width: 300px;" />
        </li>
    </ul>
</div>
<form id="dlgGenerator" class="row">
    <div style="padding: 0px 10px 0px 10px;">
        <div class="row form-group">
            <label class="col-xs-3 control-label">优惠券</label>
            <div class="col-xs-9">
                <select id="CouponId" name="CouponId" class="form-control">
                </select>
            </div>
        </div>
        <div class="row form-group">
            <label class="col-xs-3 control-label">数量</label>
            <div class="col-xs-9">
                <input id="Count" name="Count" type="number" class="form-control" value="100" />
            </div>
        </div>
    </div>
</form>

<div id="usageConfirm" style="display: none;">
    <span>你确定要使用“<span id="couponCode"></span>”优惠码吗？</span>
</div>

<div id="codeInput" style="display: none" class="row">
    <div style="padding: 0px 10px 0px 10px;">
        <div class="row form-group">
            <label class="col-xs-3 control-label">优惠券</label>
            <div class="col-xs-9">
                <input id="CouponCode" name="CouponCode" class="form-control" />
            </div>
        </div>
    </div>
</div>
